#include <algorithm>
#include "MinFilter.h"

void
MinFilter::help(std::string &buf) const
{
    buf.append("最小值滤波器;适合处理盐粒噪声.\n");
    Filter::help(buf);
    return ;
}

double
MinFilter::operOnNeigh(const cv::Mat &neigh)
{
    return *std::min_element(neigh.begin<uchar>(),neigh.end<uchar>());
}

NOISE_ALGO_REGISTER("MinFilter",MinFilter);


